package currentment;

import org.junit.jupiter.api.Test;

class Foo2Test {
    @Test
    void testFoo2(){
        Foo2 foo = new Foo2();

        Thread thread1 = new Thread(() -> {
            try {
                foo.first(() -> System.out.println("first"));
            } catch (InterruptedException ignored) {

            }
        });

        Thread thread2 = new Thread(() -> {
            try {
                foo.second(() -> System.out.println("second"));
            } catch (InterruptedException ignored) {

            }
        });

        Thread thread3 = new Thread(() -> {
            try {
                foo.third(() -> System.out.println("third"));
            } catch (InterruptedException ignored) {

            }
        });

        thread1.start();
        thread2.start();
        thread3.start();
    }
}